import request from '@/utils/request'

export function getTopicsByTag(paramMap) {
  return request({
    url: '/tag/' + paramMap.name,
    method: 'get',
    params: {
      page: paramMap.page,
      size: paramMap.size
    }
  })
}
export function getAll() {
  return request({
    url: '/tag/all',
    method: 'get',
  })
}
export function deleteById(id) {
  return request({
    url: '/tag/delete',
    method: 'get',
    params:{id}
  })
}
export function add(data) {
  return request({
    url: '/tag/insert',
    method: 'post',
    data
  })
}